package com.ruoyi.drone.domain.dto;

import jakarta.validation.constraints.*;

/**
 * 飞手注册DTO（简化版）
 * 
 * @author ruoyi
 * @date 2024-01-01
 */
public class DroneRegisterDTO {


    /** 用户名 */
    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_]{2,15}$", message = "用户名只能包含中文、字母、数字、下划线，长度2-15位")
    private String userName;

    /** 密码 */
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d@$!%*?&]{8,20}$", 
             message = "密码必须包含大小写字母和数字，长度8-20位")
    private String password;

    /** 确认密码 */
    @NotBlank(message = "确认密码不能为空")
    private String confirmPassword;

    /** 真实姓名 */
    @NotBlank(message = "真实姓名不能为空")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z\\s]{2,15}$", message = "真实姓名只能包含中文、英文和空格，长度2-15位")
    private String realName;

    // 身份证号取消

    /** 身份证正面照片 */
    @NotBlank(message = "身份证正面照片不能为空")
    private String idCardFront;

    /** 身份证反面照片 */
    @NotBlank(message = "身份证反面照片不能为空")
    private String idCardBack;

    /** 手机号码 */
    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
    private String phone;

    /** 邮箱 */
    @Email(message = "邮箱格式不正确")
    private String email;

    /** 地址 */
    private String address;

    /** 紧急联系人 */
    @NotBlank(message = "紧急联系人不能为空")
    private String emergencyContact;

    /** 紧急联系人电话 */
    @NotBlank(message = "紧急联系人电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "紧急联系人电话格式不正确")
    private String emergencyPhone;

    /** 探险信息照片 */
    @NotBlank(message = "探险信息照片不能为空")
    private String explorationInfo;

    /** 个人资质照片 */
    @NotBlank(message = "个人资质照片不能为空")
    private String qualification;

    /** 验证码 */
    @NotBlank(message = "验证码不能为空")
    private String captcha;

    /** 验证码UUID */
    @NotBlank(message = "验证码UUID不能为空")
    private String uuid;

    // 组织方特有字段
    /** 组织名称 */
    private String orgName;

    /** 营业执照图片 */
    private String licenseImage;

    // 飞手特有字段（简化版）
    /** 证书/资质证明图片列表（只保留图片URL） */
    private java.util.List<String> certificates;

    /** 技能证明图片列表（只保留图片URL） */
    private java.util.List<String> skills;


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getConfirmPassword() {
        return confirmPassword;
    }

    public void setConfirmPassword(String confirmPassword) {
        this.confirmPassword = confirmPassword;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    // 身份证号取消

    /** 年龄 */
    @Min(value = 16, message = "年龄不能小于16岁")
    @Max(value = 80, message = "年龄不能大于80岁")
    private Integer age;

    /** 飞行年限（年） */
    @Min(value = 0, message = "飞行年限不能为负数")
    @Max(value = 60, message = "飞行年限过大")
    private Integer flightYears;
    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getFlightYears() {
        return flightYears;
    }

    public void setFlightYears(Integer flightYears) {
        this.flightYears = flightYears;
    }

    public String getIdCardFront() {
        return idCardFront;
    }

    public void setIdCardFront(String idCardFront) {
        this.idCardFront = idCardFront;
    }

    public String getIdCardBack() {
        return idCardBack;
    }

    public void setIdCardBack(String idCardBack) {
        this.idCardBack = idCardBack;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getEmergencyContact() {
        return emergencyContact;
    }

    public void setEmergencyContact(String emergencyContact) {
        this.emergencyContact = emergencyContact;
    }

    public String getEmergencyPhone() {
        return emergencyPhone;
    }

    public void setEmergencyPhone(String emergencyPhone) {
        this.emergencyPhone = emergencyPhone;
    }

    public String getExplorationInfo() {
        return explorationInfo;
    }

    public void setExplorationInfo(String explorationInfo) {
        this.explorationInfo = explorationInfo;
    }

    public String getQualification() {
        return qualification;
    }

    public void setQualification(String qualification) {
        this.qualification = qualification;
    }

    public String getCaptcha() {
        return captcha;
    }

    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getLicenseImage() {
        return licenseImage;
    }

    public void setLicenseImage(String licenseImage) {
        this.licenseImage = licenseImage;
    }

    public java.util.List<String> getCertificates() {
        return certificates;
    }

    public void setCertificates(java.util.List<String> certificates) {
        this.certificates = certificates;
    }

    public java.util.List<String> getSkills() {
        return skills;
    }

    public void setSkills(java.util.List<String> skills) {
        this.skills = skills;
    }

    @Override
    public String toString() {
        return "DroneRegisterDTO{" +
                "userName='" + userName + '\'' +
                ", realName='" + realName + '\'' +
                ", age=" + age +
                ", flightYears=" + flightYears +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", orgName='" + orgName + '\'' +
                ", licenseImage='" + licenseImage + '\'' +
                '}';
    }
}